package com.hwq.kafka;

import com.hwq.kafka.test.KafkaSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: hwq
 * @Date: 2019/7/31 18:40
 * @Version 1.0
 */
@RestController
public class Controller {
    @Autowired
    private KafkaSender kafkaSender;

    @PostMapping("/test")
    public String test(String str) {
        kafkaSender.send(str);
        return "成功";
    }
}
